{extend name="base" /}
{block name="style"}
<script src="__STATIC__/doclist/js/ipage/ipage.js"></script>
<script src="__STATIC__/doclist/js/user/methods.js"></script>
<script src="__STATIC__/doclist/js/user/main.js"></script>
<link rel="stylesheet" href="__STATIC__/doclist/css/user.css">
{/block}
{block name="body"}
<div id="user_box" style="{if condition = '$user_info.bg_img'}background:url({$user_info.bg_img}) no-repeat{else /}background:url(/static/doclist/images/7777777.png) no-repeat;{/if}">
    <div class="user_box">
        <div class="set_bg_pic">设置背景</div>
        <form enctype="multipart/form-data" action="/index/user/setBgImage" method="post" id="ASMJHDGUYASGD">
            <input type="file" name="bg_file" class="asdasdasdas" style="display:none;">
        </form>
        <div class="user_item">
            <div class="head_pic">
                {if condition = "$user_info.header_url neq ''"}<img src="{$user_info.header_url}" alt="">{else /}<img src="__STATIC__/doclist/images/88888.png" alt="">{/if}
            </div>
            <form enctype="multipart/form-data" action="/index/user/setHeaderImg" method="post" id="HeaderImage">
                <input type="file" name="head_img" class="header_img_res" style="display:none;">
            </form>
            <div class="nickname">
                <h2>{$user_info.nickname}</h2>
                <span class="vip">VIP</span>
            </div>
            <div class="info">
                <div class="item">
                    <i class="mdui-icon material-icons">merge_type</i>{eq name='$user_info.sex' value='0'}保密{/eq}{eq name='$user_info.sex' value='1'}男{/eq}{eq name='$user_info.sex' value='2'}女{/eq}</div>
                <div class="item">
                    <i class="mdui-icon material-icons">map</i>北京市 朝阳区</div>
            </div>
            <div class="option">
                <div class="pic btn">上传素材</div>
                <div class="doc btn"><a href="/index/user/wenan">上传文案</a></div>
            </div>
            <div class="total">
                <div class="item">作品数：0</div>
            </div>
        </div>
    </div>
</div>
<div id="pic_upload">
    <div class="pic_upload">
        <div class="tops">
            <div class="item" type="">
                <span class="active" type="single">单图</span>
                <span type="multi">多图</span>
            </div>
        </div>
        <form id="pic_form" enctype="multipart/form-data" action="/index/test/testapi" method="post">
            <div id="pic_upload_single" class="upload">
                <div class="imglist">

                </div>
                <div class="button">
                    <button type="button" class="upload_btn mdui-ripple">点击上传</button>
                    <br>
                    <p>*也可以拖拽到该区域，完成上传</p>
                </div>
                <input type="file" class="pic_upload_files"><!-- 多图上传添加multiple="true" -->
            </div>
            <div class="input select radio">
                <span class="name">选择图片类型：</span>
                <div class="checkbox_item">
                    <label class="active">
                        <input type="radio" name="pic_class" value="1" checked/>
                        <i></i>纯图
                    </label>
                    <!-- <label>
                        <input type="radio" name="pic_class" value="2" />
                        <i></i>带字图片
                    </label> -->
                </div>
            </div>

            <div class="input">
                <span class="name">自定义标签：</span>
                <div class="input_item">
                    <input type="text" class="input_tags" value="" placeholder="输入自定义标签"/>
                    <input type="hidden" name="diy_tags" class="diy_tags"/>
                    <button type="button" class="set_tags">添加</button>
                    <div class="tag_list">

                    </div>
                </div>
            </div>

            <div class="input">
                <span class="name">图片标题：</span>
                <div class="input_item">
                    <input type="text" name="title" class="input_tags" value="" placeholder="输入标题"/>
                    <button type="button" class="set_title">保存</button>
                </div>
            </div>
            <p class="tip">禁止上传色情，反动等违法素材，背景图类型：站内重复图、图片模糊、不完整、侵权（有版权的卡通动漫、影视、游戏、真实人物等）、纯图请勿带文字</p>
            <button type="button" class="form_submit submit">上传</button>
        </form>
    </div>
</div>


<div class="teble_btn">
    <a class="teble_item" href="#table_cont1" active>图片作品</a>
    <a class="teble_item" href="#table_cont2">文案作品</a>
    <a class="teble_item" href="#table_cont3">我的收藏</a>
    <a class="teble_item" href="#table_cont4">账号设置</a>
</div>
<div id="table_box">
    <div class="table_box">
        <div class="table_box_item" id="table_cont1">
            <div class="pic_list">
                <div class="list">
                    {foreach name="img_list" item="val"}
                    <div class="item" type="pic">
                        <div class="img">
                            <img src="{$val.thumb}" alt="">
                            <div class="tag">
                                {foreach name=":config('type')" item="v2"} {eq name="$val.type" value="$v2.value"} {$v2.name} {/eq} {/foreach}
                            </div>
                            <div class="hover">
                                <div class="like active ">收藏</div>
                                <a target="_blank" href="/index/download/download/id/{$val.id}/type/image" class="download">
                                    <i class="mdui-icon material-icons">vertical_align_bottom</i>点击下载</a>
                            </div>
                        </div>
                        <p>{$val.title}</p>
                    </div>
                    {/foreach}
                </div>
            </div>
            <div class="toppages global_pages">
                {$img_list->render();}
            </div>
        </div>
        <div class="table_box_item" id="table_cont2">
            <div class="not_found">
                你还没有相关作品，点击
                <a href="#">点击这里</a>上传素材
            </div>
        </div>
        <div class="table_box_item" id="table_cont3">
            <div class="not_found">
                你还没有相关作品，点击
                <a href="#">点击这里</a>上传素材
            </div>
        </div>
        <div class="table_box_item" id="table_cont4">
            <div class="user_info">
                <form id="edit_user_info" action="/index/user/update" method="post">
                    <div class="input">
                        <span class="name">昵称：</span>
                        <input type="text" name="nickname" value="{$user_info.nickname}" />
                    </div>
                    <div class="input">
                        <span class="name">手机号：</span>
                        <input type="text" name="mobile" value="{$user_info.mobile}" placeholder="未填写" />
                    </div>
                    <div class="input">
                        <span class="name">QQ号：</span>
                        <input type="text" name="qq" value="{$user_info.qq}" placeholder="未填写" />
                    </div>
                    <div class="input">
                        <span class="name">城市：</span>
                        <input type="text" name="city" value="{$user_info.city}" placeholder="未填写" />
                    </div>
                    <div class="input radio">
                        <span class="name">性别：</span>
                        <label class="active">
                            <input type="radio" name="sex" value="1" {eq name="$user_info.sex" value="1"}checked{/eq}>男
                        </label>
                        <label>
                            <input type="radio" name="sex" value="2" {eq name="$user_info.sex" value="2"}checked{/eq}>女
                        </label>
                    </div>
                    <button type="button" class="form_submit submit">注册</button>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}
